//
//  HPCFDelegate.h
//  QuickPayment
//
//  Created by xy on 12-10-25.
//
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CLLocation.h>


//应用相关
@protocol HPAppDelegate <NSObject>

- (NSString *)getMobileType;
- (NSString *)getChannel;
- (NSString*)headServerVersion; // 获取服务器版本信息
- (NSString*)getUrlByName:(NSString*)name; // 获取联网地址
- (NSString*)getAppVersion;
- (void)initApp;

@end

@protocol HPUIDelegate <NSObject>

@required
- (void)showScreen:(UIViewController*)screen;             // 显示指定页面
- (void)popToScreen:(UIViewController*)screen animations:(BOOL)animations;              // 返回到指定的id页面
- (void)popScreen:(int)backNum animations:(BOOL)animations; // 返回几个页面
- (UIViewController*)topScreen;                           // 获取当前显示的页面
- (void)popToRootScreen:(BOOL)animations;
//- (void)showLoginScreen:(UIViewController*)screen;

@optional
- (void)showWelcomeScreen;                      // 显示欢迎界面
- (void)removeWelcomeScreen;
- (UIViewController*)createScreen:(NSString*)className withData:(NSDictionary*)screenData; // 根据数据创建页面,如果不实现，使用框架中默认的方式创建
- (void)showScreenByIndex:(NSInteger)index params:(NSDictionary*)params; // 根据索引号显示分页中的第几页
- (void)popToLoginScreen:(BOOL)animations;
@end

//支付相关
@protocol HPPayDelegate <NSObject>

-(void)DoPayment:(NSString *) merchID withOrderID:(NSString *) orderID withOrderTime:(NSString *) orderTime withPayResult:(NSString *) payResult;  // 卡号直付插件借口--待整改
-(void)DoPayment:(NSDictionary*)dic;// 支付参数

@end

@protocol HPUtilDelegate <NSObject>

/**
 * 根据经纬度显示地图
 */
- (void) showMapWithLongitude:(CLLocationDegrees)longitude latitude:(CLLocationDegrees)latitude;


/**
 * 获取用户的当前位置
 */
- (void) userCurrentLocationSuccess:(void (^)(CLLocationCoordinate2D userLocationCoordinate,NSDictionary *address))success fail:(void (^)(NSError *error))fail timeoutInterval:(NSTimeInterval)timeoutInterval;

@end